package com.jhgsys.internal.base.service;

import com.jhgsys.internal.base.entity.BaseUserScoreRecord;
import com.jhgsys.internal.common.entity.QueryRequest;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 用户积分记录 Service接口
 *
 * @author admin
 * @date 2024-09-04 13:07:28
 */
public interface IBaseUserScoreRecordService extends IService<BaseUserScoreRecord> {
    /**
     * 查询（分页）
     * @author admin
     * @date 2024-09-04 13:07:28
     * @param request QueryRequest
     * @param baseUserScoreRecord baseUserScoreRecord
     * @return IPage<BaseUserScoreRecord>
     */
    IPage<BaseUserScoreRecord> findBaseUserScoreRecordPage(QueryRequest request, BaseUserScoreRecord baseUserScoreRecord);

    /**
     * 查询（所有）
     * @author admin
     * @date 2024-09-04 13:07:28
     * @param baseUserScoreRecord baseUserScoreRecord
     * @return List<BaseUserScoreRecord>
     */
    List<BaseUserScoreRecord> findBaseUserScoreRecordList(BaseUserScoreRecord baseUserScoreRecord);

    /**
    * 根据ID查询
    * @author admin
    * @date 2024-09-04 13:07:28
    * @param id
    * @return BaseUserScoreRecord
    */
    BaseUserScoreRecord findBaseUserScoreRecordById(String id);

    /**
     * 新增
     * @author admin
     * @date 2024-09-04 13:07:28
     * @param baseUserScoreRecord baseUserScoreRecord
     */
    void createBaseUserScoreRecord(BaseUserScoreRecord baseUserScoreRecord);

    /**
     * 修改
     * @author admin
     * @date 2024-09-04 13:07:28
     * @param baseUserScoreRecord baseUserScoreRecord
     */
    void updateBaseUserScoreRecord(BaseUserScoreRecord baseUserScoreRecord);

    /**
     * 逻辑删除
     * @author admin
     * @date 2024-09-04 13:07:28
     * @param baseUserScoreRecord baseUserScoreRecord
     * @param baseUserScoreRecordIds baseUserScoreRecordIds
     */
    void deleteBaseUserScoreRecord(BaseUserScoreRecord baseUserScoreRecord,String baseUserScoreRecordIds);

    /**
    * 物理删除
    * @author admin
    * @date 2024-09-04 13:07:28
    * @param baseUserScoreRecordIds baseUserScoreRecordIds
    */
    void physicallyDeleteBaseUserScoreRecord(String baseUserScoreRecordIds);

    /**
     * 获取用户当前积分
     * @param userId
     * @return
     */
    int findTotalScoreByUserId(String userId);
}
